package com.sanpu.kxe.common.utils;

import android.text.TextUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * Description：路由集合
 * Created by 薛勇军 on 2018/8/2.
 */

public class ARouterUtils {

    protected static List<String> routers = new ArrayList<>();

    /**
     * routers，在静态代码块中加入到List中
     */
    static {
        routers.add("/main/AllApplication");
        routers.add("/main/CreditEventAct");
        routers.add("/member/Gathering");
        routers.add("/hotRecommend/PartnerAct");
        routers.add("/member/PersonGathering");
        routers.add("/repay/RepayCredit");
        routers.add("/bank/addBankAct");
        routers.add("/member/levelsListAct");
        routers.add("/member/MemberLevelDetails");
        routers.add("/member/MembershipDetails");
        routers.add("/banner/rebRain");
        routers.add("/share/app");
        routers.add("/shop/ShoppingMallActivity");
        routers.add("/shop/GoodsDetailsActivity");
        routers.add("/trade/ChargerTelFee");
        routers.add("/trade/Transaction");
        routers.add("/trade/PersonalGathering");
    }

    /**
     * 是否包含此路由地址
     */
    public static boolean containRouter(String arouter) {
        if (TextUtils.isEmpty(arouter)) return false;
        for (String router: routers) {
            if (TextUtils.equals(router, arouter)) {
                return true;
            }
        }
        return false;
    }
}
